
    <!DOCTYPE html>
    <html lang="zh-CN">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="refresh" content="1800">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>SSH错误访问报告</title>
        <style>
            body {
                font-family: Arial, sans-serif;
                background-color: #f4f4f9;
                margin: 20px;
            }
            h1 {
                text-align: center;
                color: #333;
                margin-bottom: 20px;
            }
            h2 {
                color: #555;
                margin-top: 30px;
            }
            table {
                width: 100%;
                border-collapse: collapse;
                margin-top: 10px;
                box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
            }
            th, td {
                padding: 12px 15px;
                text-align: left;
                border-bottom: 1px solid #ddd;
            }
            th {
                background-color: #007BFF;
                color: white;
            }
            tr:hover {
                background-color: #f5f5f5;
            }
            .modal {
                display: none;
                position: fixed;
                z-index: 1;
                left: 0;
                top: 0;
                width: 100%;
                height: 100%;
                overflow: auto;
                background-color: rgba(0,0,0,0.4);
            }
            .modal-content {
                background-color: #fefefe;
                margin: 15% auto;
                padding: 20px;
                border: 1px solid #888;
                width: 80%;
            }
            .close {
                color: #aaa;
                float: right;
                font-size: 28px;
                font-weight: bold;
            }
            .close:hover,
            .close:focus {
                color: black;
                text-decoration: none;
                cursor: pointer;
            }
        </style>
    </head>
    <body>
        <h1>SSH错误访问报告</h1>
    <h2>192.168.17.138</h2><table><tr><th>ip</th><th>错误次数</th><th>时间</th></tr>
            <tr>
                <td><a href="#" onclick="showModal('192.168.17.1', 'Mar 25 14:46:39 localhost sshd[2134]: Failed password for root from 192.168.17.1 port 49213 ssh2<br>Mar 25 14:46:43 localhost sshd[2134]: Failed password for root from 192.168.17.1 port 49213 ssh2<br>Mar 25 14:46:47 localhost sshd[2134]: Failed password for root from 192.168.17.1 port 49213 ssh2<br>Mar 25 14:46:52 localhost sshd[2134]: Failed password for root from 192.168.17.1 port 49213 ssh2')">192.168.17.1</a></td>
                <td>4</td>
                <td>2025-03-25 14:46:39</td>
            </tr>
            
            <tr>
                <td><a href="#" onclick="showModal('192.168.17.1', 'Mar 25 14:51:08 localhost sshd[2184]: Failed password for root from 192.168.17.1 port 49518 ssh2<br>Mar 25 14:51:12 localhost sshd[2184]: Failed password for root from 192.168.17.1 port 49518 ssh2<br>Mar 25 14:51:16 localhost sshd[2184]: Failed password for root from 192.168.17.1 port 49518 ssh2<br>Mar 25 14:51:20 localhost sshd[2184]: Failed password for root from 192.168.17.1 port 49518 ssh2')">192.168.17.1</a></td>
                <td>4</td>
                <td>2025-03-25 14:51:08</td>
            </tr>
            </table>
        <div id="myModal" class="modal">
            <div class="modal-content">
                <span class="close">&times;</span>
                <h2 id="modalTitle"></h2>
                <pre id="modalContent"></pre>
            </div>
        </div>
        <script>
            function showModal(ip, logs) {
                var modal = document.getElementById('myModal');
                var title = document.getElementById('modalTitle');
                var content = document.getElementById('modalContent');

                title.innerHTML = 'IP ' + ip + ' 详细登录记录';
                content.innerHTML = logs.replace(/<br>/g, '\n');

                modal.style.display = "block";

                var span = document.getElementsByClassName("close")[0];
                span.onclick = function() {
                    modal.style.display = "none";
                }

                window.onclick = function(event) {
                    if (event.target == modal) {
                        modal.style.display = "none";
                    }
                }
            }
        </script>
    </body>
    </html>
    